﻿using System;
using System.Management;

namespace Printer
{
    class Program
    {
        static void Main(string[] args)
        {
            AvailablePrinters();
            Console.ReadKey();
        }

        public static void AvailablePrinters()
        {
            ManagementScope ms = new ManagementScope(ManagementPath.DefaultPath);
            ms.Connect();

            SelectQuery sq = new SelectQuery();
            sq.QueryString = @"SELECT Name FROM Win32_Printer";

            ManagementObjectSearcher mos =
               new ManagementObjectSearcher(ms, sq);
            ManagementObjectCollection oObjectCollection = mos.Get();

            foreach (ManagementObject mo in oObjectCollection)
            {
                Console.WriteLine(mo["Name"].ToString());
            }
        }
    }
}
